package org.csmzxy.class2334;

public class shuzu {
    public static void main(String[] args) {
        int[] arr = {52, 63, 1, 14, 36, 95, 6, 10, 27, 40};
        int maxValue = arr[0];
        int maxIndex = 0;
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] > maxValue) {
                maxValue = arr[i];
                maxIndex = i;
            }
        }

        System.out.println("最大值是" + maxValue + ",位于数组中的第" + (maxIndex + 1) + "个位置。");
    }
}


